package com.yilijk.base.network.core;

import com.yilijk.base.network.https.HttpCallBack;

import java.lang.ref.WeakReference;

import okhttp3.ResponseBody;
import retrofit2.Call;

/**
 * Created by SHICHENG
 * <p>
 * Time on 2022/03/07
 */
public class CallEntity<T> {

    private WeakReference<Call<ResponseBody>> callWeakReference;
    private String cancelTag;
    private HttpCallBack<T> netWorkListener;

    public CallEntity(Call<ResponseBody> call, HttpCallBack netWorkListener) {
        this.callWeakReference = new WeakReference<>(call);
        this.netWorkListener = netWorkListener;
    }

    public String getCancelTag() {
        return cancelTag;
    }

    public void setCancelTag(String tag) {
        this.cancelTag = tag;
    }


    public WeakReference<Call<ResponseBody>> getCallWeakReference() {
        return callWeakReference;
    }

    public void setCallWeakReference(WeakReference<Call<ResponseBody>> callWeakReference) {
        this.callWeakReference = callWeakReference;
    }


    public HttpCallBack<T> getNetWorkListener() {
        return netWorkListener;
    }

    public void setNetWorkListener(HttpCallBack netWorkListener) {
        this.netWorkListener = netWorkListener;
    }

}
